<?php
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

require_once libfile('function/post');
require_once libfile('function/delete');
$tids = array();
$query = DB::query("SELECT tid FROM ".DB::table('donkey_activity_thread'));
while($row = DB::fetch($query)) {
	$tids[] = $row['tid'];
}
if(!empty($tids)){
deletethread($tids, true, true);
}
	
$sql = <<<EOF
DROP TABLE IF EXISTS cdb_donkey_activity;
DROP TABLE IF EXISTS cdb_donkey_activity_address;
DROP TABLE IF EXISTS cdb_donkey_activity_coupon;
DROP TABLE IF EXISTS cdb_donkey_activity_express;
DROP TABLE IF EXISTS cdb_donkey_activity_order;
DROP TABLE IF EXISTS cdb_donkey_activity_setting;
DROP TABLE IF EXISTS cdb_donkey_activity_property;
DROP TABLE IF EXISTS cdb_donkey_activity_relate;
DROP TABLE IF EXISTS cdb_donkey_activity_thread;
DROP TABLE IF EXISTS cdb_donkey_activity_apply;
DROP TABLE IF EXISTS cdb_donkey_activity_merge;
EOF;
runquery($sql);
$finish = TRUE;
?>